﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Frame.master" AutoEventWireup="true" CodeFile="cardPrice.aspx.cs" Inherits="cardPrice" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleHolder" Runat="Server">
 <asp:Label ID="lblTitle" runat="server" Text="Quản lý giá"></asp:Label>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHolder" Runat="Server">
<table width="930" border="0" align="center" cellpadding="3" cellspacing="1" class="margin_l150">
        <tr>
            <td align="left" valign="top" width="100">
                Loại thẻ</td>
            <td align="left" valign="top">
                            <asp:DropDownList ID="ddlCard" runat="server" CssClass="width_204" 
                                AppendDataBoundItems="true">
                                <asp:ListItem Value="" Text=""></asp:ListItem>
                            </asp:DropDownList>
            &nbsp;<asp:RequiredFieldValidator ID="errorCard" runat="server" ControlToValidate="ddlCard"
                    CssClass="errorMsg" ForeColor="#FF0000" SetFocusOnError="True"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="left" valign="top" width="100">
                Thời gian</td>
            <td align="left" valign="top">
                            <asp:DropDownList ID="ddlTime" runat="server" 
                    CssClass="width_204" AppendDataBoundItems="true">
                                <asp:ListItem Value="" Text=""></asp:ListItem>
                            </asp:DropDownList>
                            <asp:RequiredFieldValidator ID="errorTime" runat="server" ControlToValidate="ddlTime"
                    CssClass="errorMsg" ForeColor="#FF0000" SetFocusOnError="True"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="left" valign="top">
                Giá</td>
            <td align="left" valign="top">
                <asp:TextBox ID="txtPrice" runat="server" width="250px" MaxLength="10"></asp:TextBox>
            &nbsp;VNĐ <asp:RequiredFieldValidator ID="errorPrice" runat="server" ControlToValidate="txtPrice"
                    CssClass="errorMsg" ForeColor="#FF0000" SetFocusOnError="True" 
                    Display="Dynamic"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="left" valign="top">
                &nbsp;
                <asp:HiddenField ID="hdnId" runat="server" />
            </td>
            <td align="left" valign="top">
            <asp:ImageButton ID="btnSave" runat="server" ImageUrl="~/images/save.gif" OnClick="btnSave_Click" />
                <asp:ImageButton ID="btnReset" runat="server" ImageUrl="~/images/xoa.gif" 
                    OnClick="btnReset_Click" CausesValidation="False" /></td>
             
        </tr>
    </table>
    
    <div align="center"> <asp:Label ID="lblMsg" runat="server" ForeColor="#FF3300"></asp:Label></div>
        
     <table width="680" border="0" cellpadding="0" cellspacing="0" class="margin_b5 margin_l100">
        <tr>
            <td class="titleInfo">
                Danh sách các loại thẻ
            </td>
        </tr>
    </table>
    <div align="center" style="width:600px"> <asp:Label ID="lblInform" runat="server" ForeColor="#FF3300"></asp:Label></div>
     <asp:Repeater ID="rptCard" runat="server" onitemcommand="rptCard_ItemCommand" EnableViewState="false">
        <HeaderTemplate>
            <table width="680" border="0" align="left" align="center" cellpadding="5" cellspacing="1" class="margin_l100 tableBackground">
                    <tr>
                        <td class="tableheader" width="20"><b>STT</b></td>
                        <td class="tableheader"  align="center"><b>Loại xe</b></td>
                        <td width="70" align="center" class="tableheader"><b>Thời gian</b></td>
                         <td width="100" align="right" class="tableheader"><b>Giá(VNĐ)</b></td>
                        <td width="180" align="center" class="tableheader"><b>Người cập nhật sau cùng</b></td>
                        <td colspan="2" align="center" class="tableheader"><b>Thao tác</b></td>
                    </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr class="tableContentEven">
                <td align="center"><asp:Label ID="lblNo" runat="server" Text="<%# Container.ItemIndex + 1 %>"></asp:Label></td>
                <td align="center" valign="top"><%#Eval("CardType.Name")%></td>
                <td align="center" valign="top"><%#Eval("DayNight.Name")%></td>
                <td align="right" valign="top"><%#Eval("Price")%></td>
                 <td width="30" align="center" valign="top"><%#Eval("Employee.FirstName")%> <%#Eval("Employee.LastName")%></td> 
                <td width="30" align="center" valign="top">
                <asp:ImageButton ID="btnEdit" CausesValidation="false"  runat="server" ImageUrl="~/images/edit.png" ToolTip="Chỉnh sửa" Width="14" Height="13" CommandName="Edit" CommandArgument='<%#Eval("Id")%>'/>
                </td>               
                <td width="30" align="center" valign="top">
                    <asp:ImageButton ID="btnDelete" CausesValidation="false" OnClientClick="return confirm('Bạn chắc chắn muốn xóa?')" ImageUrl="~/images/delete.gif" ToolTip="Xóa" runat="server" CommandName="Delete" CommandArgument='<%#Eval("Id")%>'/>
                    <asp:HiddenField ID="hdnId" runat="server" Value='<%#Eval("Id")%>'/>                   
                </td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
        </table>
        </FooterTemplate>
    </asp:Repeater>
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

